//
//  talkView.m
//  QingTengGaoXiao
//
//  Created by 沈煜航 on 2018/10/3.
//  Copyright © 2018年 QingTeng. All rights reserved.
//

#import "talkView.h"
#import "cellsInTalkView.h"

@implementation talkView

#pragma 重写init

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if(self){
        self = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] objectAtIndex:0];
        [self initBeforeAll];
    }
    return self;
}

#pragma 初始化方法

-(void)initBeforeAll{
    [self.scrollView setContentSize:CGSizeMake(0, 1000)];
    cellsInTalkView* cell = [[cellsInTalkView alloc] init];
    [self.scrollView addSubview:cell];
}

#pragma public方法

-(void)changeTitle{
    UIView* rootView = self.superview.superview;
    for(UIView* view in rootView.subviews){
        if(view.tag == 123){
            rootView = view;
            break;
        }
    }
    for(UIView* view in rootView.subviews){
        if(view.tag == 123){
            UILabel* titleLabel = (UILabel*)view;
            [titleLabel setText:@"学长学姐说"];
            break;
        }
    }
}

#pragma 按钮的action

@end
